cmake_minimum_required(VERSION 3.8)
project(agv_indicators)

if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 17)
endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(tf2_ros REQUIRED)

find_package(agv_srvs REQUIRED)
find_package(agv_msgs REQUIRED)

find_package(yaml-cpp REQUIRED)
find_package(shared_parameters REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread system chrono)

include_directories(
  include
)

add_executable(${PROJECT_NAME} 
  src/vehicle_status.cpp
  src/output_interface.cpp
  src/timer.cpp
  src/indicators.cpp
)

target_include_directories(${PROJECT_NAME} PRIVATE
  include
)

ament_target_dependencies(${PROJECT_NAME}
  rclcpp
  rclcpp_action
  geometry_msgs
  sensor_msgs
  std_srvs
  std_msgs
  tf2_ros
  agv_srvs
  agv_msgs
  yaml-cpp
  shared_parameters
)

install(TARGETS ${PROJECT_NAME}
  DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY launch/
  DESTINATION share/${PROJECT_NAME}/launch
)

ament_export_include_directories(include)
ament_export_dependencies(
  rclcpp
  rclcpp_action
  geometry_msgs
  sensor_msgs
  std_srvs
  std_msgs
  tf2_ros
  agv_srvs
  agv_msgs
  yaml-cpp
)

ament_package()